package dfrz.com.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author PuXiaLing
 * @description: TODO
 * @date 2024/1/5 19:48
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class R {
    private Integer code;
    private String msg;
    private Object data;
    public static R success(){
        return new R(200,"操作成功",null);
    }
    public static R success(Object data){
        return new R(200,"操作成功",data);
    }
    public static  R error(){
        return new R(501,"操作失败",null);
    }
}
